package io.github.idol

import android.arch.lifecycle.ViewModel
import android.databinding.ViewDataBinding
import android.support.v7.widget.RecyclerView
import android.view.View

class DataBindingViewHolder(private val viewDataBinding: ViewDataBinding): RecyclerView.ViewHolder(viewDataBinding.root) {

    fun bind(viewModel: ViewModel){
        viewDataBinding.setVariable(BR.viewModel,viewModel)
        viewDataBinding.executePendingBindings()
    }
}